package com.atstudy.headline.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 违规内容记录表
 * @TableName violation_records
 */
@TableName(value ="violation_records")
@Data
public class ViolationRecords {
    /**
     * 违规记录ID
     */
    @TableId(type = IdType.AUTO)
    private Integer violationId;

    /**
     * 内容ID
     */
    private Integer contentId;

    /**
     * 用户ID
     */
    private Integer userId;

    /**
     * 违规类型编码
     */
    private Integer violationCode;

    /**
     * 违规类型（关联base_dicts.dict_type）
     */
    private String violationType;

    /**
     * 违规描述
     */
    private String description;

    /**
     * 违规证据
     */
    private Object evidence;

    /**
     * 处理状态（1:待处理，2:已处理，3:已申诉）
     */
    private Integer status;

    /**
     * 处理人员ID
     */
    private Integer processorId;

    /**
     * 处罚类型（1:警告，2:删除内容，3:禁言，4:封禁账号）
     */
    private Integer penaltyType;

    /**
     * 处罚天数
     */
    private Integer penaltyDays;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 处理时间
     */
    private Date processTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ViolationRecords other = (ViolationRecords) that;
        return (this.getViolationId() == null ? other.getViolationId() == null : this.getViolationId().equals(other.getViolationId()))
            && (this.getContentId() == null ? other.getContentId() == null : this.getContentId().equals(other.getContentId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getViolationCode() == null ? other.getViolationCode() == null : this.getViolationCode().equals(other.getViolationCode()))
            && (this.getViolationType() == null ? other.getViolationType() == null : this.getViolationType().equals(other.getViolationType()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getEvidence() == null ? other.getEvidence() == null : this.getEvidence().equals(other.getEvidence()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getProcessorId() == null ? other.getProcessorId() == null : this.getProcessorId().equals(other.getProcessorId()))
            && (this.getPenaltyType() == null ? other.getPenaltyType() == null : this.getPenaltyType().equals(other.getPenaltyType()))
            && (this.getPenaltyDays() == null ? other.getPenaltyDays() == null : this.getPenaltyDays().equals(other.getPenaltyDays()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getProcessTime() == null ? other.getProcessTime() == null : this.getProcessTime().equals(other.getProcessTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getViolationId() == null) ? 0 : getViolationId().hashCode());
        result = prime * result + ((getContentId() == null) ? 0 : getContentId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getViolationCode() == null) ? 0 : getViolationCode().hashCode());
        result = prime * result + ((getViolationType() == null) ? 0 : getViolationType().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getEvidence() == null) ? 0 : getEvidence().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getProcessorId() == null) ? 0 : getProcessorId().hashCode());
        result = prime * result + ((getPenaltyType() == null) ? 0 : getPenaltyType().hashCode());
        result = prime * result + ((getPenaltyDays() == null) ? 0 : getPenaltyDays().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getProcessTime() == null) ? 0 : getProcessTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", violationId=").append(violationId);
        sb.append(", contentId=").append(contentId);
        sb.append(", userId=").append(userId);
        sb.append(", violationCode=").append(violationCode);
        sb.append(", violationType=").append(violationType);
        sb.append(", description=").append(description);
        sb.append(", evidence=").append(evidence);
        sb.append(", status=").append(status);
        sb.append(", processorId=").append(processorId);
        sb.append(", penaltyType=").append(penaltyType);
        sb.append(", penaltyDays=").append(penaltyDays);
        sb.append(", createTime=").append(createTime);
        sb.append(", processTime=").append(processTime);
        sb.append("]");
        return sb.toString();
    }
}